package com.example.demo.Mapper;

import com.example.demo.entity.ClientAsset;
import com.example.demo.entity.MyAssetInfo;
import com.example.demo.entity.UserInfo;
import com.example.demo.entity.VisuaInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import java.util.List;


@Repository
@Mapper
public interface My_assetMapper {
        @Select("SELECT product_id,amount FROM finance.buy WHERE client_id IN (select client_id from finance.client where client_name = #{name})")
        List<MyAssetInfo> getMyAsset(String name);


        @Select("SELECT * from sum_asset WHERE client_id IN (select client_id from finance.client where client_name = #{name})")
        List<ClientAsset> getMyCurr(String name);


        @Select("SELECT balance_sum,due_sum,product_sum from sum_asset WHERE client_id IN (select client_id from finance.client where client_name = #{name})")
        VisuaInfo visualData(String name);

}
